import request from '../utils/request'

export const getRoomListAPI = () => {
  return request.get('/room')
}

export const deleteRoomAPI = (id) => {
  return request.delete('/room/' + id)
}

export const getRoomDetailAPI = (id) => {
  return request.get('/room/' + id)
}

export const getPassRoomAPI = () => {
  return request.get('/house')
}

export const updateRoomAPI = ({ id, point, building, room, name, gender, mobile, idcardFrontUrl, idcardBackUrl }) => {
  return request.post('/room', { id, point, building, room, name, gender, mobile, idcardFrontUrl, idcardBackUrl })
}

export const uploadPicAPI = (file) => {
  return request.post('/upload', { file })
}
